@import "mixins/mixins";
@import "common/var";
@import "mixins/utils";

@include b(image-viewer) {
  @include e(paint-top){
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 50px;
    padding: 0 20px;
    line-height: 50px;
    background-color: rgba(0,0,0,0.5);
    color: $--color-white;
    h4{
      display: inline-block;
      margin: 0;
      max-width: 80%;
      font-size: 16px;
      @include utils-ellipsis;
    }
    .number{
      width: 120px;
      margin: 0 40px;
      text-align: center;
    }
  }
  @include e(paint-top-left){
    flex: 1;
    width: 0;
  }
  @include e(paint-top-right){
    flex: 1;
    width: 0;
    text-align: right;
    .close{
      cursor: pointer;
      font-size: 14px;
    }
  }
  

  @include e(paint-actions) {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 50px;
    transform: translateX(-50%);
    border-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    @include e(paint-actions__inner) {
      display: flex;
      align-items: center;
      height: 50px;
      padding: 0 10px;
      background-color: #000;
    }
    .split{
      width: 2px;
      height: 20px;
      margin: 0 10px;
      border-radius: 1px;
      background-color: rgba(255,255,255,.3);
    }
    button{
      margin: 0 10px;
      height: 100%;
      padding: 0;
      outline: none;
      background-color: transparent;
      border: none;
      color: rgba(255,255,255,.6);
      line-height: 1;
      cursor: pointer;
      i{
        font-size: 18px;
        vertical-align: middle;
      }
      .text{
        margin-left: 4px;
        font-size: 14px;
        vertical-align: middle;
      }
      &:hover,&:active,&:focus,&.active{
        color: $--color-white;
      }
      &:disabled{
        color: rgba(255,255,255,.3);
        cursor: not-allowed;
      }
      &.btn-text-icon i{
        font-size: 14px;
      }
    }
  }
  @include e(paint-sub-actions__inner) {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 10px;
    background-color: rgba(0, 0, 0, .72);
    .width{
      display: flex;
      margin: 0 10px;
      width: 18px;
      height: 18px;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      .dot{
        border-radius: 100%;
        background-color: rgba(255,255,255,.6);
      }
      &.active{
        .dot{
          background-color: #fff;
        }
      }
      &.width-small{
        .dot{
          height: 4px;
          width: 4px;
        }
      }
      &.width-middle{
        .dot{
          height: 8px;
          width: 8px;
        }
      }
      &.width-large{
        .dot{
          height: 12px;
          width: 12px;
        }
      }
    }
    .split{
      width: 2px;
      height: 20px;
      margin: 0 10px;
      border-radius: 1px;
      background-color: rgba(255,255,255,.3);
    }
    .color{
      width: 16px;
      height: 16px;
      margin: 0 10px;
      border-radius: 1px;
      border: solid 1px #f60000;
      cursor: pointer;
      &.color-red{
        background-color: #f60000;
        border-color: #f60000;
      }
      &.color-yellow{
        background-color: #f7b13d;
        border-color: #f7b13d;
      }
      &.color-blue{
        background-color: #529fff;
        border-color: #529fff;
      }
      &.color-green{
        background-color: #69d184;
        border-color: #69d184;
      }
      &.color-purple{
        background-color: #8d77fb;
        border-color: #8d77fb;
      }
      &.color-black{
        background-color: #000;
        border-color: #000;
      }
      &.color-gray{
        background-color: #666;
        border-color: #666;
      }
      &.color-white{
        background-color: #fff;
        border-color: #fff;
      }
      &.active{
        border-color: #fff;
      }
    }
  }
  
  @include e(view-actions) {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    .ul-button{
      margin: 0 8px;
    }
  }
}

@include b(image-paint) {
  position: absolute;
  left: 0;
  right: 0;
  top: 50px;
  bottom: 0;
  width: 940px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  .ul-scrollbar{
    max-height: 100%;
    display: flex;
    flex-direction: column;
  }
  @include e(inner) {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
  @include e(img-wrapper) {
    img{
      max-width: 100%;
      background-size: contain;
      background-position: center;
      background-repeat: no-repeat;
    }
  }

  @include e(prev){
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 24px;
    color: #fff;
    background-color: rgba(0,0,0,0.5);
    border-color: #fff;
    left: -110px;
    i{
      font-size: 20px;
    }
    &:hover{
      background-color: #000;
    }
    &.is-disabled{
      background-color: rgba(0,0,0,0.3);
      color: rgba(255,255,255,0.3);
    }
  }

  @include e(next){
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 24px;
    color: #fff;
    background-color: rgba(0,0,0,0.5);
    border-color: #fff;
    right: -110px;
    text-indent: 2px;
    i{
      font-size: 20px;
    }
    &:hover{
      background-color: #000;
    }
    &.is-disabled{
      background-color: rgba(0,0,0,0.3);
      color: rgba(255,255,255,0.3);
    }
  }
}
